<template>
    <div class="common-layout">
        <el-container>
            <el-header style="background-color: dodgerblue;">
                溯源管理
                <span style="float:right;">
                    用户名:{{ UserData.userName }}-真实姓名:{{ UserData.userReal }}
                </span>
            </el-header>
            <el-container>
                <el-aside width="200px">

                    <el-menu active-text-color="#ffd04b" background-color="#545c64" class="el-menu-vertical-demo"
                        default-active="2" text-color="#fff" router>
                        <el-sub-menu index="1">
                            <template #title>
                                <el-icon>
                                    <location />
                                </el-icon>
                                <span>溯源管理</span>
                            </template>
                            <el-menu-item index="/GoodsView">商品管理</el-menu-item>
                            <el-menu-item index="/detail">深度管理</el-menu-item>
                            <!-- <el-menu-item index="/">item three</el-menu-item>  -->

                            <!-- <el-menu-item-group title="Group One">
                            </el-menu-item-group>  -->


                        </el-sub-menu>




                    </el-menu>

                </el-aside>
                <el-main>
                    <RouterView />
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue'

const UserData = reactive({
    userName: localStorage.getItem('userName'),
    userReal: localStorage.getItem('userReal')
})

onMounted(() => {
    UserData
})

</script>